# eric7.Plugins.WizardPlugins.QRegularExpressionWizard.QRegularExpressionWizardCharactersDialog

Module implementing a dialog for entering character classes.

### Global Attributes

None

### Classes

QRegularExpressionWizardCharactersDialog | Class implementing a dialog for entering character classes.

### Functions

None

## QRegularExpressionWizardCharactersDialog

Class implementing a dialog for entering character classes.

### Derived from

QDialog, Ui_QRegularExpressionWizardCharactersDialog

### Class Attributes

None

### Class Methods

None

### Methods

QRegularExpressionWizardCharactersDialog | Constructor
__addRangesLine | Private slot to add a line of entry widgets for character ranges.
__addSinglesLine | Private slot to add a line of entry widgets for single characters.
__formatCharacter | Private method to format the characters entered into the dialog.
__initCharacterSelectors | Private method to initialize the W3C character selector entries.
__performSelectedAction | Private method performing some actions depending on the input.
__populateCharTypeCombo | Private method to populate a given character type selection combo box.
__populateCharacterCombo | Private method to populate a character selection combo.
__rangesCharTypeSelected | Private slot to handle the activated(int) signal of the char ranges combo boxes.
__singlesCharTypeSelected | Private slot to handle the activated(int) signal of the single chars combo boxes.
getCharacters | Public method to return the character string assembled via the dialog.

### Static Methods

None

#### QRegularExpressionWizardCharactersDialog (Constructor)

QRegularExpressionWizardCharactersDialog(parent=None)

Constructor

parent (QWidget)
  reference to the parent widget

#### QRegularExpressionWizardCharactersDialog.__addRangesLine

__addRangesLine()

Private slot to add a line of entry widgets for character ranges.

#### QRegularExpressionWizardCharactersDialog.__addSinglesLine

__addSinglesLine()

Private slot to add a line of entry widgets for single characters.

#### QRegularExpressionWizardCharactersDialog.__formatCharacter

__formatCharacter(char, formatIdentifier)

Private method to format the characters entered into the dialog.

char (str)
  character string entered into the dialog
formatIdentifier (str)
  string giving a special format (-c, -h, -i or -o) or the already formatted character

Return:
  formatted character string

Return Type:
  str

#### QRegularExpressionWizardCharactersDialog.__initCharacterSelectors

__initCharacterSelectors()

Private method to initialize the W3C character selector entries.

#### QRegularExpressionWizardCharactersDialog.__performSelectedAction

__performSelectedAction(formatIdentifier, lineedit, combo)

Private method performing some actions depending on the input.

formatIdentifier (str)
  format of the selected entry
lineedit (QLineEdit)
  line edit widget to act on
combo (QComboBox)
  combo box widget to act on

#### QRegularExpressionWizardCharactersDialog.__populateCharTypeCombo

__populateCharTypeCombo(combo, isSingle)

Private method to populate a given character type selection combo box.

combo (QComboBox)
  reference to the combo box to be populated
isSingle (bool)
  flag indicating a singles combo

#### QRegularExpressionWizardCharactersDialog.__populateCharacterCombo

__populateCharacterCombo(combo, formatIdentifier)

Private method to populate a character selection combo.

combo (QComboBox)
  combo box to be populated
formatIdentifier (str)
  format identifier (one of "-ccp", "-ccn", "-cbp", "-cbn", "-csp", "-csn", "-psp", "-psn")

#### QRegularExpressionWizardCharactersDialog.__rangesCharTypeSelected

__rangesCharTypeSelected(index, combo)

Private slot to handle the activated(int) signal of the char ranges combo boxes.

index (int)
  selected list index
combo (QComboBox)
  reference to the combo box

#### QRegularExpressionWizardCharactersDialog.__singlesCharTypeSelected

__singlesCharTypeSelected(index, combo)

Private slot to handle the activated(int) signal of the single chars combo boxes.

index (int)
  selected list index
combo (QComboBox)
  reference to the combo box

#### QRegularExpressionWizardCharactersDialog.getCharacters

getCharacters()

Public method to return the character string assembled via the dialog.

Return:
  formatted string for character classes

Return Type:
  str

Up